:# MS Word documents
application/msword; ~/.mutt/view_attachment.sh %s "-" '/Applications/TextEdit.app'

# Images
image/jpg; ~/.mutt/view_attachment.sh %s jpg
image/jpeg; ~/.mutt/view_attachment.sh %s jpg
image/pjpeg; ~/.mutt/view_attachment.sh %s jpg
image/png; ~/.mutt/view_attachment.sh %s png
image/gif; ~/.mutt/view_attachment.sh %s gif

# PDFs
application/pdf; ~/.mutt/view_attachment.sh %s pdf

# HTML
# text/html; ~/.mutt/view_attachment.sh %s html
# https://www.debian-administration.org/article/75/Reading_HTML_email_with_Mutt
#
# text/html; links -dump %s; nametemplate=%s.html; copiousoutput
text/html; w3m -I %{charset} -dump -T text/html %s; copiousoutput

# Unidentified files
application/octet-stream; ~/.mutt/view_attachment.sh %s "-"
